// Identity: takes a single argument a returns that argument.
const I = a => a;

// Mockingbird: takes a single argument (of type function) and calls that argument with itself.
const M = a => a(a);

// Kestrel: takes 2 arguments and returns the first.
const K = a => b => a;
// Can be used to create a function which returns a constant.
const K5 = K(5);

// Kite: takes 2 arguments and returns the second.
const KI = a => b => b;

// Cardinal - takes 2 arguments and flips them.
const C = f => a => b => f(b)(a);
// KI = C(K);
// K = C(KI);

const subtract = a => b => a - b;
const flipSubtract = C(subtract);
// console.log(flipSubtract(5)(3));

export { I, M, K, KI, C };
